package afcp.alumni.file;

import java.util.List;

import afcp.alumni.model.db.FileColumn;

public class ExcelFile implements AlumniFile {

//	private static final Log logger = LogFactory.getLog(ExcelFile.class);
	
	private int sheetNumber = 1;
	private List<FileColumn> headers;
	public int getSheetNumber() {
		return sheetNumber;
	}
	public void setSheetNumber(int sheetNumber) {
		this.sheetNumber = sheetNumber;
	}
	@Override
	public List<FileColumn> getHeaders() {
		return headers;
	}
	public void setHeaders(List<FileColumn> headers) {
		this.headers = headers;
	}
	@Override
	public void trimHeaders() {
		for (FileColumn column : headers) {
			column.setLabel(column.getLabel().trim());
		}
//		for (Entry<String, String> entry : headers.entrySet()) {
//			entry.setValue(entry.getValue().trim());
//		}
	}

//	@Deprecated
//	@Override
//	public FileReader toFileReader(InputStream inputStream) {
//		try {
//			return new ExcelReader(inputStream, sheetNumber-1);
////			return ExcelReader.getInstance(inputStream, sheetNumber-1);
//		} catch (InvalidFormatException|IOException e) {
//			logger.error("Exception occurred while making a reader for Excel file.", e);
//			return null;
//		}
////		return new MemberReader(inputStream, this);
//	}
}
